package ntd.action.impl;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import ntd.action.ActionAbs;
import ntd.action.bo.ActionInfo;
import ntd.action.bo.ActionOutBo;
import ntd.util.UtilLocal;

public class ActionLocalIp extends ActionAbs {

    @Override
    public ActionInfo info() {
        return new ActionInfo("本地IP", "action-loc-ip", new ActionLocalIp());
    }

    @Override
    public ActionOutBo handle() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.putOnce("local-ip", UtilLocal.getIpAddress());
        return new ActionOutBo(jsonObject);
    }
}
